home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacFormat 1995 January
/
macformat-020.iso
/
Shareware City
/
Developers
/
Think C dcmd 1.0.1 ƒ
/
Think Put Lib source
/
PutTextTo.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
UTF-8
Wrap
C/C++ Source or Header
|
1994-08-31
|
412 b
|
22 lines
|
[
TEXT/KAHL
]
extern unsigned char __putBuffer[256];
extern short __putMark;
void PutChar(char c);
void PutSpacesTo(int endpos);
void PutTextTo(const char* s, int len, int endpos)
{
int i;
if ( endpos > __putMark )
{
for ( i=0; i<len && __putMark<endpos; i++ )
PutChar( s[i] );
if ( i < len )
__putBuffer[__putMark] = '…';
else
PutSpacesTo( endpos ); /* pads with spaces if necessary */
}
}